package com.dayuanit.dy8.atm.springbootatm.mapper;

import com.dayuanit.dy8.atm.springbootatm.entity.Flow;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FlowMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Flow record);

    int insertSelective(Flow record);

    Flow selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Flow record);

    int updateByPrimaryKey(Flow record);

    List<Flow> listFlows(@Param("userId") Integer userId,
                         @Param("cardNum") String cardNum,
                         @Param("offset") Integer offset,
                         @Param("prePageNum") Integer prePageNum);

    int countFlows(@Param("userId") Integer userId,
                   @Param("cardNum") String cardNum);

    List<Flow> listTop10(@Param("userId") Integer userId);
}